<?php
/**
 * Created by PhpStorm.
 * User: Yui
 * Date: 2017/5/16 0016
 * Time: 15:50
 */

namespace common\models;


use yii\base\Model;

class MemberRegister extends Model
{
    public $mobile;
    public $member_name;
    public $nickname;
    public $email;
    public $password;
    public $avatar;
    public $truename;
    public $identity;
    public $sex;
    public $birthday;
    public $email_subscriptions;
    public $province_id;
    public $city_id;
    public $area_id;
    public $address;
    public $introduction;
    public $property;
    public $strengths;
    public $verify_code;
    public $pca_info;
    public $role;
    public $parent_role;
    public $ancestors_role;

    public function rules()
    {
        return [
            [['mobile', 'password','role'], 'required'],
            [['sex', 'email_subscriptions', 'province_id', 'city_id', 'area_id','role','parent_role','ancestors_role'], 'integer'],
            [['birthday'], 'safe'],
            [['mobile'], 'string', 'max' => 20],
            [['member_name', 'nickname', 'email', 'truename'], 'string', 'max' => 50],
            [['password', 'avatar'], 'string', 'max' => 100],
            [['identity'], 'string', 'max' => 18],
            [['address', 'introduction', 'property', 'strengths', 'pca_info'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return (new Member())->attributeLabels();
    }


}